package edu.polsl.bio.str.manager.command;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * //todo class description
 * <p/>
 * Created on: Jul 22, 2011 2:50:30 PM <br/>
 * <a href="http://www.polsl.pl">www.polsl.pl</a>
 *
 * @author lukasz.olczak@polsl.pl
 */
public abstract class BaseCommand<T> implements Command<T> {
  /**
   * slf4j Logger.
   */
  private static final Logger log = LoggerFactory.getLogger(BaseCommand.class.getName());

  protected T context;

  @Override
  public void execute() throws Exception {
    performLogic(context);
  }

  protected abstract void performLogic(T context);

  public void setContext(T context) {
    this.context = context;
  }
}
